package com.chance.cc.crawler.development.command.schedule.bitauto;

import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.development.command.schedule.CrawlerJobScheduleCommand;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-18 13:40:24
 * @email okprog@sina.com
 */
public class BitAutoCrawlerJobScheduler {
    private static CrawlerJobScheduleCommand crawlerJobScheduleCommand =
            new CrawlerJobScheduleCommand("192.168.1.215",9589);
    private static String device_name = "crawler_dev_host";

    @Test
    public void delSchedulerJob(){
        HttpPage httpPage = crawlerJobScheduleCommand.deleteCrawlerJob("bitauto-video-trace-realtime-cron", "crawler_dev_host");
        System.out.println("delete crawler job : " + httpPage.getRawText());
    }

    @Test
    public void BitAutoArticleJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-article-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-article-realtime-cron",device_name);
    }

    @Test
    public void BitAutoArticleTraceJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-article-trace-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-article-trace-realtime-cron",device_name);
    }
    @Test
    public void BitAutoVideoJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-video-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-video-realtime-cron",device_name);
    }

    @Test
    public void BitAutoVideoTraceJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-video-trace-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-video-trace-realtime-cron",device_name);
    }

    @Test
    public void BitAutoForumReleaseJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-forum_release-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-forum_release-realtime-cron",device_name);
    }

    @Test
    public void BitAutoForumReplyJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-forum_reply-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-forum_reply-realtime-cron",device_name);
    }

    @Test
    public void BitAutoForumInteractionJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-forum_release-interaction-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-forum_release-interaction-realtime-cron",device_name);
    }

    @Test
    public void BitAutoPraiseJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-praise-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-praise-realtime-cron",device_name);
    }

    @Test
    public void BitAutoPraiseTraceJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-praise-trace-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-praise-trace-realtime-cron",device_name);
    }

    @Test
    public void BitAutoHaoArticleJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-hao_article-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-hao_article-realtime-cron",device_name);
    }


    @Test
    public void BitAutoHaoArticleTraceJobScheduler(){
//        crawlerJobScheduleCommand.publishCrawlerJob("bitauto-hao_article-trace-realtime-cron",device_name);
        crawlerJobScheduleCommand.republishCrawlerJob("bitauto-hao_article-trace-realtime-cron",device_name);
    }

}
